#include "GroundPlane.h"
#include "TextureManager.h"
#include "Game.h"


#include <GL\glut.h>

GroundPlane::GroundPlane(int size, const std::string& texFilePath, int id) : m_cuboid(size*2, 0.01f, size*2)
{
	m_size = size;
	m_id = id;
	m_texPath = texFilePath;


	
}

void GroundPlane::Draw()
{

	TheTextureManager::Instance()->DrawTexture(m_texPath);
	m_cuboid.Draw();

	/*
	glPushMatrix();
	glBegin(GL_QUADS);

	TheTextureManager::Instance()->DrawTexture(m_texPath);

	
	glTexCoord2f(0,1);
	glVertex3f(-m_size, 0, m_size);
	glTexCoord2f(0,0);
	glVertex3f(-m_size, 0, -m_size);
	glTexCoord2f(1,0);
	glVertex3f(m_size, 0, -m_size);
	glTexCoord2f(1,1);
	glVertex3f(m_size, 0, m_size);


	glEnd();

	glPopMatrix();

	*/
}

void GroundPlane::Update()
{

}

const char* GroundPlane::GetTypeName() const
{
	return "GroundPlane";
}